#include "p7.h"
#include <iostream>


void testHomeWork7_02() {
    std::cout << "How many students are in your class? ";
    int students{};
    std::cin >> students;


    if (students > Constants::maxClassSize)
        std::cout << "There are too many students in this class";
    else
        std::cout << "This class isn't too large";
}


static int accumulateVal(int input, bool enReset = false) {
    static int sum { 0 };
    if (enReset) {
        sum = 0;
    }

    sum += input;

    return sum;
}

void testHomeWork7_03() {
    std::cout << accumulateVal(4) << '\n'; // prints 4
    std::cout << accumulateVal(3) << '\n'; // prints 7
    std::cout << accumulateVal(2) << '\n'; // prints 9
    std::cout << accumulateVal(1) << '\n'; // prints 10
}
